<template>
  <div class="newest">
    <NewestItem v-for="item in listArr" :key="item.id" :itemObj=item />
  </div>
</template>

<script>
import { nsAxios } from '@/network/indexAxios.js'
import NewestItem from '@/components/NewestItem'
export default {
  data () {
    return {
      listArr: []
    }
  },
  components: {
    NewestItem
  },
  mounted () {
    this.getNws()
  },
  methods: {
    getNws () {
      nsAxios().then(res => {
        this.listArr = res.data
      })
    }
  }
}
</script>

<style lang="less" scoped>
.newest{
  background-color: #efefef;
  padding: 0.3rem 0.2rem;
  margin-top: 0.3rem;
  column-count: 2;
  column-gap: 0.15rem;
}

</style>
